package com.home.activities;

import java.util.Timer;
import java.util.TimerTask;

import com.home.rhtester.R;

import android.content.Intent;
import android.os.Bundle;

public class WelcomeActivity extends AdvanceActivity {

	Timer changeScreenTimer;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.welcomelayout);
		changeScreenTimer = new Timer();
		changeScreenTimer.schedule(new ChangeUI(), 1000);

	}

	class ChangeUI extends TimerTask {

		@Override
		public void run() {
			Intent i = new Intent(WelcomeActivity.this,
					ListCategoriesActivity.class);
			WelcomeActivity.this.startActivity(i);
			finish();

		}

	}

	@Override
	protected void onRestoreInstanceState(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onRestoreInstanceState(savedInstanceState);
	}

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		changeScreenTimer.cancel();

	}

}